home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16572 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: ix.netcom.com!news
  2. From: andy0756@ix.netcom.com (Andy Connors)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Making your own streambuf classes
  5. Date: 11 Apr 1996 02:27:43 GMT
  6. Organization: Netcom
  7. Message-ID: <4khqmv$enc@dfw-ixnews8.ix.netcom.com>
  8. References: <4k64mu$9v@oden.abc.se>
  9. NNTP-Posting-Host: irv-ca15-21.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-NETCOM-Date: Wed Apr 10  9:27:43 PM CDT 1996
  13. X-Newsreader: WinVN 0.99.7
  14.  
  15. In article <4k64mu$9v@oden.abc.se>, mikes@abc.se writes...
  16. >
  17. >I'm trying to write some custom streambuf classes for handling other
  18. >kinds of data sources than files and strings. But it's more difficult
  19. >than I expected. Where can I find useful reference documents?
  20. >
  21. >The current problem is how the sync() method should be implemented.
  22. >What it sync() supposed to do? I found a source for filebuf using
  23. ><io.h>, it used lseek() in sync. I'm working with strictly sequencial
  24. >data sources (such as an asynchronous serial port) where you can't do
  25. >something like that.
  26. >
  27.  
  28. Hi,
  29.  
  30. Try the IOStreams Handbook by Steve Teale.  I don't have the ISBN number (it's 
  31. at work and I'm at home now), but I believe it's published by Addison-Wesley.  
  32. It's a little dated (streams are now template-based), but it has the 
  33. information you need.  I've also found the Watcom C++ hardcopy manuals to 
  34. have very good information regarding stream classes and the protocol that 
  35. derived streambuf classes should adhere to regarding the override of sync() and 
  36. others.  And yes, it's a difficult subject.
  37.  
  38. Andy Connors
  39.  
  40.  
  41.